<template>
  <div>{{ user }}</div>
</template>

<script>
  import Vue from 'vue'

  export default {
    name: 'index',
    data() {
      return {
        user: {}
      }
    },
    created() {
      console.log('问卷调查 -> created')
      this.init()
    },
    methods: {
      init() {
        if (sessionStorage.ENV) {
          Vue.prototype.$ENV = JSON.parse(sessionStorage.ENV)
          this.user = Vue.prototype.$ENV
        } else {
          this.$router.push({
            path: '/login'
          })
        }
      }
    }
  }
</script>

<style>

</style>
